import ExcelJS from 'exceljs';

export async function readExcel(stream: Buffer) {
  if (!stream) throw new Error('stream is required');

  const workbook = new ExcelJS.Workbook();
  await workbook.xlsx.load(stream);

  return workbook;
}
